/**
 * Class representing a kill in a game implemented by a gamehandler.
 * 
 * @author Paul Redert
 * 
 * author: Paul Redert
 * license: GPLV3
 * 
 * GoldenAK Bot - code.google.com/p/goldenak-bot
 * 
 */

// TODO documentation
package eu.goldenak.ircbot.game;

import java.util.Calendar;
import java.util.Date;

public abstract class Kill {
	
	/**
	 * The player that killed the target.
	 */
	private Player killer;
	
	/**
	 * The target that was killed by the player.
	 */
	private Player target;
	
	/**
	 * The time at which the kill took place.
	 */
	private Calendar currentTime;
	
	/**
	 * The map at which the kill took place.
	 */
	private Map map;
	
	/**
	 * The weapon of this player.
	 */
	private String weapon;
	
	/**
	 * The bodypart that got hit during this kill.
	 */
	private String bodyPart;
	
	/**
	 * The type of kill that took place.
	 */
	private String type;
	
	/**
	 * Something like that.
	 */
	public enum BodyPart {
		HEAD,
		LEFTARM,
		RIGHTARM,
		LEFTHAND,
		RIGHTHAND,
		LEFTUPPERLEG,
		RIGHTUPPERLEG,
		LEFTLOWERLEG,
		RIGHTLOWERLEG,
		LEFTFOOT,
		RIGHTFOOT,
		UPPERBODY,
		LOWERBODY,
		UNKNOWN
	}
	
	/**
	 * Either make this very general or just copy the CoD4 things. Can finetune
	 * it when more games come round.
	 */
	public enum Type {
		RIFLE_BULLIT,
		UNKNOWN
	}
	
	/**
	 * Returns a date object for the date this kill took place.
	 * @return date object for the date this kill took place
	 */
	public Date getDate(){
		return currentTime.getTime();
	}
	
	/**
	 * Returns a calendar object for the date this kill took place.
	 * @return calendar object for the date this kill took place
	 */
	public Calendar getCalendar(){
		return currentTime;
	}
	
	/**
	 * The player who killed the target.
	 * @return
	 */
	public Player getKiller(){
		return killer;
	}
	
	/**
	 * The player that is the target of this kill.
	 * @return
	 */
	public Player getTarget(){
		return target;
	}

	/**
	 * Returns the map this kill happened on. 
	 * @return the map
	 */
	public Map getMap() {
		return map;
	}

	/**
	 * Returns the weapon of the killer.
	 * @return the weapon of the killer
	 */
	public String getWeapon() {
		return weapon;
	}
	
	/**
	 * Returns the body part of the target that got hit.
	 * @return the body part that got hit
	 */
	public String getBodypart(){
		return bodyPart;
	}
	
	/**
	 * Returns the type of the kill (rifle, grenade, etc.)
	 * @return the type of the kill
	 */
	public String getType(){
		return type;
	}
}